﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Maticsoft222.BLL
{
    public class sqlexec
    {
        Maticsoft222.DAL.sqlexec sqldal = new Maticsoft222.DAL.sqlexec();
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<Maticsoft222.Model.sqlex> exsql(string sql)
        {
            return sqldal.exsql(sql);
        }
        public DataSet query(string sql)
        {
            return sqldal.query(sql);
        }
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<Maticsoft222.Model.sqlex> excodesql(string sql)
        {
            return sqldal.excodesql(sql);
        }
        public bool ExecuteSql(string sql)
        {
            return sqldal.ExecuteSql(sql);
        }
        /// <summary>
        /// 添加对档案引用
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool setturestatus(string id)
        {
            return sqldal.ExecuteSql("update [Dictionary] set isdel=1 where code='" + id + "'");
        }
        /// <summary>
        /// 删除对档案引用
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool setfalsestatus(string id)
        {
            return sqldal.ExecuteSql("update [Dictionary] set isdel=0 where code='" + id + "'");
        }
    }
}
